//-----------------------------------------------------------------------
// <copyright file="a_PromoService.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections;
using ThoiTrang.Entities;
using ThoiTrang.Data;
    
namespace ThoiTrang.Business
{   
	/// <summary>
	/// 
	/// </summary> 
    public class a_PromoService
    {
        #region a_Promo

        public static void Createa_Promo(a_Promo a_Promo)
        {            
            try
            {
                a_PromoDAO a_PromoDAO = new a_PromoDAO();
                a_PromoDAO.Createa_Promo(a_Promo);
            }            
            catch (Exception ex)
            {                
                throw ex;
            }
        }        

        public static void Updatea_Promo(a_Promo a_Promo)
        {            
            try
            {
                a_PromoDAO a_PromoDAO = new a_PromoDAO();
                a_PromoDAO.Updatea_Promo(a_Promo);
            }           
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static void Deletea_Promo(int promoID)
        {            
            try
            {
                a_PromoDAO a_PromoDAO = new a_PromoDAO();
                a_PromoDAO.Deletea_Promo(promoID);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }
        
        public static a_Promo Geta_Promo(int promoID)
        {            
            try
            {
                a_PromoDAO a_PromoDAO = new a_PromoDAO();
                return a_PromoDAO.Geta_Promo(promoID);                
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }                

        public static a_PromoCollection Geta_PromoList(a_PromoColumns orderBy, OrderDirection orderDirection)
        {            
            try
            {
                a_PromoDAO a_PromoDAO = new a_PromoDAO();
                return a_PromoDAO.Geta_PromoList(orderBy, orderDirection);
            }            
            catch (Exception ex)
            {
               throw ex;
            }
        }        

        public static a_PromoCollection Geta_PromoList(a_PromoColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {            
            try
            {
                a_PromoDAO a_PromoDAO = new a_PromoDAO();
                return a_PromoDAO.Geta_PromoList(orderBy, orderDirection, page, pageSize, out totalRecords);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        #endregion
    }
}